package leetcode.middle._146;

import java.util.HashMap;

/**
 * @author mgl
 * @version 1.0
 * @description TODO 设计一个LRU算法的缓存，存和取都满足o(1)复杂度
 * @date 2023/9/24 13:38
 */
public class LRUCache {

    private HashMap<Integer,Integer> keyValue = new HashMap<>();
    private HashMap<Integer,Integer> keyPrior = new HashMap<>();
    int[] arrPrior = new int[3000];

    int capacity;
    int count;
    public LRUCache(int capacity) {
        this.capacity = capacity;
        count = 0;
    }

    public int get(int key) {
        if (count == 0) return -1;
        return keyValue.get(key);
    }

    public void put(int key, int value) {

    }
}
